# Contributor: Bart Ribbers <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-plasma
maintainer="team/kde <bribbers@disroot.org>"
pkgname=plasma-dialer
pkgver=6.2.3
pkgrel=0
pkgdesc="A dialer for Plasma Mobile"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://invent.kde.org/plasma-mobile/plasma-dialer"
license="GPL-2.0-or-later"
depends="
	kirigami-addons5
	kirigami2
	oxygen-sounds
	"
makedepends="
	extra-cmake-modules
	callaudiod-dev
	kcontacts-dev
	kcoreaddons-dev
	kdbusaddons-dev
	ki18n-dev
	kio-dev
	kirigami-addons-dev
	knotifications-dev
	kpeople-dev
	libphonenumber-dev
	modemmanager-qt-dev
	pulseaudio-qt-dev
	qt6-qtbase-dev
	qt6-qtdeclarative-dev
	qt5-qtfeedback-dev
	qt5-qtquickcontrols2-dev
	qtmpris-dev
	reuse
	samurai
	"
subpackages="$pkgname-lang"
_repo_url="https://invent.kde.org/plasma-mobile/plasma-dialer.git"
source="https://download.kde.org/stable/plasma/$pkgver/plasma-dialer-$pkgver.tar.xz
	0001-plasma-dialer-Improve-positioning-of-the-number-selector.patch
	"
options="!check" # No tests

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
fa1784f7c9f7f031f61a5885f2dc8419a1cb837290631d07fa96759952840b8e7c8e8e8632cb60240ca01c4156e36a3259d4fe4b74a2ad43a5319e6b9d510cf0  plasma-dialer-6.2.3.tar.xz
ae53a602011c15bfb5c1708da0d1b3c008335885b4e01d781d8f74fbe947394bc2d0e11f034a1c486c8370a64ceb684a9f43c353fc2b078cf561685b992b867b  0001-plasma-dialer-Improve-positioning-of-the-number-selector.patch
"
